let  express=require("express");
// let  cors=require("cors");
let  bp=require('body-parser');
let  app=express();
// app.use(cors());
app.use(bp.urlencoded({extended:false}));
// app.use(bp.json());
app.get("/get",function (req,res) {
    console.log("wahh")
    if (req.query.username=="lily"&&req.query.password=="123"){
        res.send({msg:"hello,lily"})
    }else {
        res.send({msg:"拜拜了你嘞"})
    }
});
app.post("/post",function (req,res) {
    console.log(req.body);
    res.json({msg:"hi post-axios"})
// res.send({msg:"拜拜了你嘞"});
})

app.listen(7890,function () {
console.log("服务搭建成功")
})